package cn.ytr.project.query;

import java.math.BigDecimal;

import cn.ytr.project.util.StringUtil;
import lombok.Getter;
import lombok.Setter;

//封装商品的高级查询参数
@Getter
@Setter
public class ProductQueryObject extends QueryObject {

	private String keyword;
	private BigDecimal minSalePrice;
	private BigDecimal maxSalePrice;

	// 如果keyword是null或者空字符串(去除前后空格)时,返回null
	public String getKeyword() {
		return StringUtil.hasLength(keyword) ? keyword : null;
	}
}
